﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using System.Linq;
using System.Data.Linq;
using System.Collections.Generic;
namespace Exact_Extension
{
    public partial class ProformaInvRptHeader : DevExpress.XtraReports.UI.XtraReport
    {

        List<ISHCMC_ListInvoiceDetail> ListInvoiceDetail;
        string title ="";
        ISHCMC_StudentPayment itemStudentPayment;
        ISHCMC_V_StudentListWithDebtor itemStudent;
        public ProformaInvRptHeader()
        {
            InitializeComponent();
           
        }
        public void SetListInvoiceDetail(List<ISHCMC_ListInvoiceDetail> _ListInvoiceDetail,ISHCMC_StudentPayment _itemStudentPayment,ISHCMC_V_StudentListWithDebtor _itemStudent)
        {
            ListInvoiceDetail = _ListInvoiceDetail;
            itemStudentPayment = _itemStudentPayment;
            itemStudent = _itemStudent;
                
        }
        public void SetTitle(string _title)
        {
            title = _title;
        }
        public void SetAttention(string attention)
        {
            this.lbAttention.Text = attention;
        }
        private void ProformaInv_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
           

            foreach (ISHCMC_ListInvoiceDetail item in ListInvoiceDetail)
            {
                this.lbInvoiceDebtorName.Text = item.BillingName.ToString();

                this.lbAddress1.Text = item.BillingAddr1;
                this.lbAddress2.Text = item.BillingAddr2;
                this.lbAddress3.Text = item.BillingAddr3;
                //this.lbInvoiceNo.Text = item.yourref.ToString();
                //if (item.Invoicedate.HasValue)
                //{
                //    this.lbInvoiceDate.Text = item.Invoicedate.Value.ToString("dd MMM yyyy", System.Globalization.CultureInfo.GetCultureInfo("en"));
                //}
                //if (item.DueDate.HasValue)
                //{
                //    this.lbDueDate.Text = item.DueDate.Value.ToString("dd MMM yyyy", System.Globalization.CultureInfo.GetCultureInfo("en"));
                //}
            }
              
        }

        private void lbGrade_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {

        }

    }
}
